package com.xbongbong.pro.invoice.pojo;

import com.alibaba.fastjson.JSONArray;
import com.xbongbong.paas.domain.entity.PaasFormDataEntity;
import com.xbongbong.paas.toolbox.wrap.UserVO;
import com.xbongbong.pro.formdata.pojo.SaasNeedRedundantAttrPojo;
import com.xbongbong.saas.domain.entity.ext.InvoiceEntityExt;
import com.xbongbong.saas.enums.business.RefTypeEnum;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

import java.io.Serializable;
import java.util.List;

/**
 * invoiceCommonSaveHandle方法传入的参数pojo
 *
 * @author yuqian
 * @version v1.0
 * @date 2019/11/18 14:02
 * @since v1.0
 */
@Getter
@Setter
@ToString
public class InvoiceCommonSavePojo implements Serializable {


    private static final long serialVersionUID = -1695118743312024194L;
    /**
     * 关联id的上级集合
     * 例如 发票先关联合同在关联合同的应收款,应收款的上级就是合同
     */
    private List<Long> parentRefIdList;
    /**
     * 关联id集合
     */
    private List<Long> refIdList;
    /**
     * 公司id
     */
    private String corpid;
    /**
     * 发票id
     */
    private Long invoiceId;

    /**
     * 原始发票id
     */
    private Long originId;
    /**
     * 合同编号 xxx,xxxx
     */
    private List<String> contractNos;

    /**
     * 采购合同编号
     */
    private List<String> purchaseNos;
    /**
     * 时间
     */
    private Long now;
    /**
     * 客户id
     */
    private Long customerId;
    /**
     * 客户名称
     */
    private String customerName;

    /**
     * 供应商id
     */
    private Long supplierId;

    /**
     * 供应商 名称
     */
    private String supplierName;

    /**
     * 是否合并开票
     */
    private SaasNeedRedundantAttrPojo saasNeedRedundantAttrPoJo;
    /**
     * 是否
     */
    private Boolean isEnable;
    /**
     * 是否导入
     */
    private Integer isImport;
    /**
     * 是否红冲
     */
    private Boolean isRed;

    /**
     * 是否新建
     */
    private Boolean isNew;
    /**
     * 关联类型枚举
     */
    private  RefTypeEnum refTypeEnum;
    /**
     * 开票金额
     */
    private Double totalMoney;

    private JSONArray amountDetail;

    /**
     * 消息推送需要的发票实体
     */
    private PaasFormDataEntity entityExt;

    private UserVO loginUser;

    private Integer businessType;

    private Integer subBusinessType;

    public InvoiceCommonSavePojo() {
    }

    public InvoiceCommonSavePojo(List<Long> parentRefIdList,String corpid,Long invoiceId,Long originId,Long now,SaasNeedRedundantAttrPojo saasNeedRedundantAttrPoJo,Boolean isNew,Boolean isEnable, Integer isImport, Boolean isRed, Double totalMoney, JSONArray amountDetail,PaasFormDataEntity entityExt,UserVO loginUser,Integer businessType,Integer subBusinessType){
        this.parentRefIdList = parentRefIdList;
        this.corpid = corpid;
        this.invoiceId = invoiceId;
        this.originId = originId;
        this.now = now;
        this.saasNeedRedundantAttrPoJo = saasNeedRedundantAttrPoJo;
        this.isNew = isNew;
        this.isEnable = isEnable;
        this.isImport = isImport;
        this.isRed = isRed;
        this.totalMoney = totalMoney;
        this.amountDetail = amountDetail;
        this.entityExt = entityExt;
        this.loginUser = loginUser;
        this.businessType = businessType;
        this.subBusinessType = subBusinessType;
    }
}
